package com.atguigu.ggkt.order.service;

import com.atguigu.ggkt.box.OrderBox;
import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
import com.wechat.pay.java.service.payments.model.Transaction;

import java.io.IOException;
import java.util.Map;

public interface WxPayService {
    //微信 Jsapi 支付
    default Map<String, Object> createJsapi(String orderNo){

        return null;
    }
    //微信 Jsapi 支付 demo
    default PrepayWithRequestPaymentResponse createJsapiDemo() throws IOException {

        return null;
    }
    //微信 Jsapiv3 支付
    default PrepayWithRequestPaymentResponse createJsapiv3(String orderNo) throws Exception {

        return null;
    }
    //微信 Native 支付
    default Map<String, Object> createNative(String orderNo){

        return null;
    }
//    //根据订单号调用微信接口查询支付状态
//    default Map<String, String> queryPayStatus(String orderNo){
//
//        return null;
//    }

    default Transaction queryPayStatus(String orderNo, OrderBox box) {
        return null;
    }

    default void setOrderBox(String orderNo, OrderBox orderBox){

    }

    default void updateResultAfterWxNotify(Transaction transaction, String requestBody){

    }

    default void updateResult(Transaction transaction, String requestBody){

    }
}
